import { axiosGet, axiosPost, axiosPut, axiosDelete } from '/@/api/RequestBase';
import { SqlSugarPagedList, BaseKeywordPageInput } from '/@/api/BaseDto';

import { BasConfigInput } from './dto/BasConfigInput';
import { BasConfigAllOutput } from './dto/BasConfigAllOutput';
import { BasConfigOutput } from './dto/BasConfigOutput';

export type { BasConfigInput, BasConfigAllOutput, BasConfigOutput };

const service = 'BasConfig/'; // 要写后面的斜杠, 不要写前面的斜杠

export const BasConfigApi = {
	page: (data: BaseKeywordPageInput) => {
		return axiosPost<SqlSugarPagedList<BasConfigOutput>>(service + 'page', data);
	},
	all: () => {
		return axiosPost<BasConfigAllOutput[]>(service + 'all', {});
	},
	update: (data: BasConfigInput) => {
		return axiosPut<boolean>(service + 'update', data);
	},
};
